package cn.jizi.bshisy.controller;

import cn.jizi.bshisy.entity.Examine;
import cn.jizi.bshisy.entity.PayItems;
import cn.jizi.bshisy.service.ExamineService;
import cn.jizi.bshisy.tool.ShuiJi;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Date;

@RestController
@RequestMapping("/examine")
public class ExamineController {

    @Resource
    private ExamineService examineService;

    /*添加一条检查项目表信息*/
    @ApiOperation(value="添加一条检查项目表信息", notes="添加一条检查项目表信息")
    @PostMapping(value = "/getAddExamine")
    public String getAddPayItems(Examine examine) {
        examine.setEid(ShuiJi.random());
        int count=examineService.getAddExamine(examine);
        if(count>0){
            return "添加成功";
        }else {
            return "添加失败";
        }
    }
}
